Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ServiceWorker] Add verbose mode for debugging #410

Merged
merged 1 commit into from
May 23, 2024
Merged

[ServiceWorker] Add verbose mode for debugging #410

merged 1 commit into from
May 23, 2024

Conversation

Neet-Nestor
Copy link
Contributor

@Neet-Nestor Neet-Nestor commented May 22, 2024

Using service worker sometimes is tricky, especially when you are trying to debug an issue. This PR adds additional debug level logs for printing the entire event trace for easier debugging.

Broswer console in default logging level:
Screenshot 2024-05-22 at 7 51 22 PM

Broswer console in verbose logging level:
Screenshot 2024-05-22 at 7 51 48 PM

@tqchen
Copy link
Contributor

tqchen commented May 22, 2024

would be great to change to logLevel, we should also consider allow customized logger interface in future, but not something we have to do now.

We can do conditional execution inside the logger(checks logLevel)

logger.info("message", structured_data)

@Neet-Nestor
Copy link
Contributor Author

@tqchen Updated. For now, I'm using the default console.debug() method which will only ouptut if broswer log level is set to verbose.

@tqchen tqchen merged commit e7c0806 into mlc-ai:main May 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants